import gtk
import gtk.glade
from Doctor import *

class DeleteDoctorWindow:
	def __init__(self):
		gladefile="setup_pickup.glade"
		windowname="DeleteDoctorWindow"
		self.wTree=gtk.glade.XML (gladefile,windowname)
		dic = { "onDeleteClicked" : self.onDeleteClicked,
			"onCancelClicked" : self.onCancelClicked }
		self.wTree.signal_autoconnect (dic)
		self.doctors = Doctor()
		self.treestore = gtk.TreeStore(int, str, str)
		for doctor in self.doctors.getData():
			self.treestore.append(None, (doctor[0], doctor[1], doctor[2]))
		print len(self.treestore)
		
	def onDeleteClicked(self, widget):
		pass
		
	def onCancelClicked(self, widget):
		window = self.wTree.get_widget("DeleteDoctorWindow")
		window.destroy()